const App = require('koa');
const router = require('./router.js');
const bodyparser = require('koa-bodyparser')

const app = new App();

app.use(bodyparser());

// 注册路由
app.use(router.routes()).use(router.allowedMethods());

app.listen(8080,()=> {
  console.log('server is running...')
})